package com.shiyu.exam.config;

import com.shiyu.exam.properties.MinioProperties;
import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;


//@SpringBootConfiguration
public class MinioConfiguration {

//    @Autowired
    private MinioProperties minioProperties;

    @Bean
    public MinioClient minioClient(){
        return MinioClient.builder()
                .endpoint(minioProperties.getEndpoint())
                .credentials(minioProperties.getAccessKey(),minioProperties.getSecretKey())
                .build();
    }
}
